//
//  TrainDetailController.m
//  TrainT1
//  $Id: TrainDetailController.m 46 2010-06-13 08:36:47Z qiaolun $
//
//  Created by Qiao Lun on 6/5/10.
//  Copyright 2010 Koolanoo Group. All rights reserved.
//

#import "TrainDetailController.h"


@implementation TrainDetailController

@synthesize tableDataDetail;
@synthesize train_detail_window;
@synthesize table_view_detail;

- (NSInteger) numberOfRowsInTableView:(NSTableView *)aTableview {
	return [tableDataDetail count];
}

- (id) tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)column row:(NSInteger)row {
	
	NSString *col_id = [column identifier];
	// NSLog(@"%@", [tableData objectAtIndex:row]);
	NSString *content = [[tableDataDetail objectAtIndex:row] objectForKey:col_id];
	if([content isEqualToString:@""]){
		content = @"--";
	}
	return content;
	// return [NSString stringWithFormat:@"row: %@, col: %d", [aTableColumn identifier], rowindex];
}


@end
